// 导出格式枚举
export enum ExportFormat {
  MARKDOWN = 'markdown',
  HTML = 'html',
  PDF = 'pdf'
}

// 导出类型枚举
export enum ExportType {
  SINGLE = 'single',
  DIRECTORY = 'directory',
  PROJECT = 'project',
  CURRENT_DIRECTORY = 'currentDirectory'
}

// 合并选项枚举
export enum MergeOption {
  MERGE = 'merge',      // 合并为单个文件
  SEPARATE = 'separate' // 分别导出文件
}

// 文档数据接口
export interface DocData {
  docTitle: string
  docContent: string | null
  createTime: string
}

// 导出进度接口
export interface ExportProgress {
  total: number
  current: number
  status: 'preparing' | 'downloading' | 'processing' | 'completed' | 'error' | 'paused'
  message: string
  currentDoc?: string
}

// 导出会话接口
export interface ExportSession {
  sessionId: string
  exportType: ExportType
  format: ExportFormat
  mergeOption: MergeOption
  addWatermark: boolean
  totalDocs: number
  completedDocs: string[]
  failedDocs: string[]
  currentProgress: number
  startTime: Date
  lastUpdateTime: Date
  status: 'running' | 'paused' | 'completed' | 'failed'
  teamId?: string
  projectId?: string
  directoryId?: string
  docId?: string
}

// 导出任务接口
export interface ExportTask {
  id: string
  session: ExportSession
  execute(): Promise<void>
  pause(): void
  resume(): void
  cancel(): void
}

// 导出选项接口
export interface ExportOptions {
  format: ExportFormat
  mergeOption: MergeOption
  addWatermark: boolean
  projectName: string
  directoryName?: string
} 